/*****************************************************************************
  Copyright ?2002-2004 by Martin Cook. All rights are reserved. If you like
  this code then feel free to go ahead and use it. The only thing I ask is 
  that you don't remove or alter my copyright notice. Your use of this 
  software is entirely at your own risk. I make no claims about the 
  reliability or fitness of this code for any particular purpose. If you 
  make changes or additions to this code then please clearly mark your code 
  as yours. If you have questions or comments then please contact me at: 
  martin@codegator.com
  
  Have Fun! :o)
*****************************************************************************/


using System;
using System.Data;

namespace CG.Security.Data
{

	/// <summary>
	/// Data access operations for roles.
	/// </summary>
	public interface IRoleData
	{
		
		/// <summary>
		/// Creates a new system-level role.
		/// </summary>
		/// <param name="roleName">The name of the role (must be unique).</param>
		/// <param name="roleDescription">The description of the role (optional).</param>
		/// <returns>The identifier for the role.</returns>
		int Create(
			string roleName,
			string roleDescription
			);

		// ******************************************************************

		/// <summary>
		/// Deletes the specified system-level role.
		/// </summary>
		/// <param name="roleID">The identifier for the role.</param>
		void Delete(
			int roleID
			);

		// ******************************************************************

		/// <summary>
		/// Updates the specified system-level role. 
		/// </summary>
		/// <param name="roleID">The identifier for the role.</param>
		/// <param name="roleName">The new name of the role (must be unique).</param>
		/// <param name="roleDescription">The new description of the role (optional).</param>
		void Update(
			int roleID,
			string roleName,
			string roleDescription
			);

		// ******************************************************************

		/// <summary>
		/// Returns all the system-level roles in the database.
		/// </summary>
		/// <returns>A DataSet containing all the roles in the database.</returns>
		System.Data.DataSet FindAll();

		// ******************************************************************

		/// <summary>
		/// Returns the properties for the specified system-level role.
		/// </summary>
		/// <param name="rightID">The identifier for the role.</param>
		/// <returns>A DataReader containing the properties for the specified role.</returns>
		System.Data.IDataReader FindByPK(
			int roleID
			);

	} // End IRoleData

} // End namespace CG.Security.Data

